import * as actions from '../actions/index';

// 对页面prop 数据进行管理
const initialState = {
  lfsInfo: {},
  isLoading: false,
  page: 1,
  total: 0,
  list: [],
  per_page: 10,
};
const defaultAction = {
  type: 'doNothing',
};

export default function index(state = initialState, action = defaultAction) {
  switch (action.type) {
    case actions.GET_LFS_INFO:
      return { ...state, lfsInfo: action.data };
    case actions.UPDATE_DATA:
      return { ...state, ...action.data };
    default:
      return state;
  }
}
